package com.example.xin.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class HelloWorldController {
	
	@Value("${neo.hi}")
    private String hi;

    @RequestMapping("/hi")
    public String hi() {
        return this.hi;
    }
    
    @RequestMapping("/hello")
    public String index(String name) {
    	if (name==null){
    		name="xin";
    	}
        return "Hello World "+name+"!";
    }
}